﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IntelligentPharmacy.publicclass
{
    class ReadAppConfig
    {
        static ConfigManager config = new ConfigManager();
        public static void writeWarehouseName(string value)
        {
            config.SaveAppSetting("warehouseName",value);
            //config.AppSettings.Settings["warehouseName"].Value = value;
        }

        public static void writeeqpMac(string value)
        {
            config.SaveAppSetting("eqpMac", value);
            //config.AppSettings.Settings["warehouseName"].Value = value;
        }
        public static void writeeqptId(string value)
        {
            config.SaveAppSetting("eqptId", value);
            //config.AppSettings.Settings["warehouseName"].Value = value;
        }
        public static string readereqptId()
        {
            string name = config.GetAppSetting("eqptId");
            return name;
        }
        public static string readereqpMac()
        {
            string name = config.GetAppSetting("eqpMac");
            return name;
        }

        public static string readerWarehouseName()
        {
            string name = config.GetAppSetting("warehouseName");
            return name;
        }
    }
}
